
package com.bstek.urule.model.rete.builder;

import com.bstek.urule.model.rete.BaseReteNode;
import com.bstek.urule.model.rule.lhs.BaseCriterion;
import com.bstek.urule.model.rule.lhs.Criterion;
import com.bstek.urule.model.rule.lhs.NamedCriteria;

/**
 * @author Jacky.gao
 * @since 2016年9月12日
 */
public class NamedCriteriaBuilder extends CriterionBuilder {

    @Override
    public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) {
        NamedCriteria criteria = (NamedCriteria) c;
        return buildNamedCriteria(criteria, null, context);
    }

    @Override
    public boolean support(Criterion criterion) {
        return criterion instanceof NamedCriteria;
    }

}
